<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title></title>
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet" href="css/swiper.min.css">
		<style>
			html,
			body {
				position: relative;
				height: 100%;
			}

			body {
				margin: 0;
				padding: 0;
			}

			.swiper-container {
				width: 100%;
				height: 100%;
			}

			/* 用text-align:center和line-height=外容器height也可达到横竖居中 */
			.swiper-slide {
				/* text-align: center; */
				background-color: #ccc;
				/* line-height: 300px; */
				display: flex;
				justify-content: center;
				align-items: center;
			}
		</style>
	</head>
	<body>
		<!-- 可以给swiper-container所在的元素自定义class名用于swiper对象挂载 -->
		<div class="swiper-container">
			<div class="swiper-wrapper">
				<div class="swiper-slide">第1页</div>
				<div class="swiper-slide">第2页</div>
				<div class="swiper-slide">第3页</div>
				<div class="swiper-slide">第4页</div>
				<div class="swiper-slide">第5页</div>
				<div class="swiper-slide">第6页</div>
				<div class="swiper-slide">第7页</div>
				<div class="swiper-slide">第8页</div>
				<div class="swiper-slide">第9页</div>
				<div class="swiper-slide">第10页</div>
			</div>
			<!-- 变按钮为滚动条 -->
			<div class="swiper-scrollbar"></div>  
			<!-- 添加左右箭头控制轮播 -->
			<!-- 在swiper.min.css中可以设置箭头的背景background -->
			<div class="swiper-button-prev swiper-button-white"></div>
			<div class="swiper-button-next swiper-button-black"></div>
		</div>
		<script src="js/swiper.min.js"></script>
		<script>
			var swiper = new Swiper(".swiper-container", {
				scrollbar:".swiper-scrollbar",
				scrollbarHide:true,  //隐藏滚动条 点击才显示
				paginationClickable: true, 
				spaceBetween: 20,
					
				prevButton:".swiper-button-prev",
				nextButton:".swiper-button-next",
				grabCursor:true, //抓手光标   
			});
		</script>
	</body>
</html>
